Optimal. Leaf size=96 \[ -\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}+\frac {2 \cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^4(e+f x)}{5 f \sqrt {a \cos ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3255, 3286,
2686, 200} \begin {gather*} -\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^4(e+f x)}{5 f \sqrt {a \cos ^2(e+f x)}}+\frac {2 \cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 200
Rule 2686
Rule 3255
Rule 3286
Rubi steps
\begin {align*} \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx &=\int \frac {\cot ^6(e+f x)}{\sqrt {a \cos ^2(e+f x)}} \, dx\\ &=\frac {\cos (e+f x) \int \cot ^5(e+f x) \csc (e+f x) \, dx}{\sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cos (e+f x) \text {Subst}\left (\int \left (-1+x^2\right )^2 \, dx,x,\csc (e+f x)\right )}{f \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cos (e+f x) \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\csc (e+f x)\right )}{f \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}+\frac {2 \cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^4(e+f x)}{5 f \sqrt {a \cos ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 49, normalized size = 0.51 \begin {gather*} -\frac {\cot (e+f x) \left (15-10 \csc ^2(e+f x)+3 \csc ^4(e+f x)\right )}{15 f \sqrt {a \cos ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 5.45, size = 54, normalized size = 0.56
method | result | size |
default | \(-\frac {\cos \left (f x +e \right ) \left (15 \left (\sin ^{4}\left (f x +e \right )\right )-10 \left (\sin ^{2}\left (f x +e \right )\right )+3\right )}{15 \sin \left (f x +e \right )^{5} \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) | \(54\) |
risch | \(-\frac {2 i \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left (15 \,{\mathrm e}^{8 i \left (f x +e \right )}-20 \,{\mathrm e}^{6 i \left (f x +e \right )}+58 \,{\mathrm e}^{4 i \left (f x +e \right )}-20 \,{\mathrm e}^{2 i \left (f x +e \right )}+15\right )}{15 \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{5}}\) | \(103\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1344 vs.
\(2 (94) = 188\).
time = 0.67, size = 1344, normalized size = 14.00 \begin {gather*} \frac {2 \, {\left ({\left (15 \, \sin \left (9 \, f x + 9 \, e\right ) - 20 \, \sin \left (7 \, f x + 7 \, e\right ) + 58 \, \sin \left (5 \, f x + 5 \, e\right ) - 20 \, \sin \left (3 \, f x + 3 \, e\right ) + 15 \, \sin \left (f x + e\right )\right )} \cos \left (10 \, f x + 10 \, e\right ) + 75 \, {\left (\sin \left (8 \, f x + 8 \, e\right ) - 2 \, \sin \left (6 \, f x + 6 \, e\right ) + 2 \, \sin \left (4 \, f x + 4 \, e\right ) - \sin \left (2 \, f x + 2 \, e\right )\right )} \cos \left (9 \, f x + 9 \, e\right ) + 5 \, {\left (20 \, \sin \left (7 \, f x + 7 \, e\right ) - 58 \, \sin \left (5 \, f x + 5 \, e\right ) + 20 \, \sin \left (3 \, f x + 3 \, e\right ) - 15 \, \sin \left (f x + e\right )\right )} \cos \left (8 \, f x + 8 \, e\right ) + 100 \, {\left (2 \, \sin \left (6 \, f x + 6 \, e\right ) - 2 \, \sin \left (4 \, f x + 4 \, e\right ) + \sin \left (2 \, f x + 2 \, e\right )\right )} \cos \left (7 \, f x + 7 \, e\right ) + 10 \, {\left (58 \, \sin \left (5 \, f x + 5 \, e\right ) - 20 \, \sin \left (3 \, f x + 3 \, e\right ) + 15 \, \sin \left (f x + e\right )\right )} \cos \left (6 \, f x + 6 \, e\right ) + 290 \, {\left (2 \, \sin \left (4 \, f x + 4 \, e\right ) - \sin \left (2 \, f x + 2 \, e\right )\right )} \cos \left (5 \, f x + 5 \, e\right ) + 50 \, {\left (4 \, \sin \left (3 \, f x + 3 \, e\right ) - 3 \, \sin \left (f x + e\right )\right )} \cos \left (4 \, f x + 4 \, e\right ) - {\left (15 \, \cos \left (9 \, f x + 9 \, e\right ) - 20 \, \cos \left (7 \, f x + 7 \, e\right ) + 58 \, \cos \left (5 \, f x + 5 \, e\right ) - 20 \, \cos \left (3 \, f x + 3 \, e\right ) + 15 \, \cos \left (f x + e\right )\right )} \sin \left (10 \, f x + 10 \, e\right ) - 15 \, {\left (5 \, \cos \left (8 \, f x + 8 \, e\right ) - 10 \, \cos \left (6 \, f x + 6 \, e\right ) + 10 \, \cos \left (4 \, f x + 4 \, e\right ) - 5 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \sin \left (9 \, f x + 9 \, e\right ) - 5 \, {\left (20 \, \cos \left (7 \, f x + 7 \, e\right ) - 58 \, \cos \left (5 \, f x + 5 \, e\right ) + 20 \, \cos \left (3 \, f x + 3 \, e\right ) - 15 \, \cos \left (f x + e\right )\right )} \sin \left (8 \, f x + 8 \, e\right ) - 20 \, {\left (10 \, \cos \left (6 \, f x + 6 \, e\right ) - 10 \, \cos \left (4 \, f x + 4 \, e\right ) + 5 \, \cos \left (2 \, f x + 2 \, e\right ) - 1\right )} \sin \left (7 \, f x + 7 \, e\right ) - 10 \, {\left (58 \, \cos \left (5 \, f x + 5 \, e\right ) - 20 \, \cos \left (3 \, f x + 3 \, e\right ) + 15 \, \cos \left (f x + e\right )\right )} \sin \left (6 \, f x + 6 \, e\right ) - 58 \, {\left (10 \, \cos \left (4 \, f x + 4 \, e\right ) - 5 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \sin \left (5 \, f x + 5 \, e\right ) - 50 \, {\left (4 \, \cos \left (3 \, f x + 3 \, e\right ) - 3 \, \cos \left (f x + e\right )\right )} \sin \left (4 \, f x + 4 \, e\right ) - 20 \, {\left (5 \, \cos \left (2 \, f x + 2 \, e\right ) - 1\right )} \sin \left (3 \, f x + 3 \, e\right ) + 100 \, \cos \left (3 \, f x + 3 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) - 75 \, \cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 75 \, \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) - 15 \, \sin \left (f x + e\right )\right )} \sqrt {a}}{15 \, {\left (a \cos \left (10 \, f x + 10 \, e\right )^{2} + 25 \, a \cos \left (8 \, f x + 8 \, e\right )^{2} + 100 \, a \cos \left (6 \, f x + 6 \, e\right )^{2} + 100 \, a \cos \left (4 \, f x + 4 \, e\right )^{2} + 25 \, a \cos \left (2 \, f x + 2 \, e\right )^{2} + a \sin \left (10 \, f x + 10 \, e\right )^{2} + 25 \, a \sin \left (8 \, f x + 8 \, e\right )^{2} + 100 \, a \sin \left (6 \, f x + 6 \, e\right )^{2} + 100 \, a \sin \left (4 \, f x + 4 \, e\right )^{2} - 100 \, a \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 25 \, a \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, {\left (5 \, a \cos \left (8 \, f x + 8 \, e\right ) - 10 \, a \cos \left (6 \, f x + 6 \, e\right ) + 10 \, a \cos \left (4 \, f x + 4 \, e\right ) - 5 \, a \cos \left (2 \, f x + 2 \, e\right ) + a\right )} \cos \left (10 \, f x + 10 \, e\right ) - 10 \, {\left (10 \, a \cos \left (6 \, f x + 6 \, e\right ) - 10 \, a \cos \left (4 \, f x + 4 \, e\right ) + 5 \, a \cos \left (2 \, f x + 2 \, e\right ) - a\right )} \cos \left (8 \, f x + 8 \, e\right ) - 20 \, {\left (10 \, a \cos \left (4 \, f x + 4 \, e\right ) - 5 \, a \cos \left (2 \, f x + 2 \, e\right ) + a\right )} \cos \left (6 \, f x + 6 \, e\right ) - 20 \, {\left (5 \, a \cos \left (2 \, f x + 2 \, e\right ) - a\right )} \cos \left (4 \, f x + 4 \, e\right ) - 10 \, a \cos \left (2 \, f x + 2 \, e\right ) - 10 \, {\left (a \sin \left (8 \, f x + 8 \, e\right ) - 2 \, a \sin \left (6 \, f x + 6 \, e\right ) + 2 \, a \sin \left (4 \, f x + 4 \, e\right ) - a \sin \left (2 \, f x + 2 \, e\right )\right )} \sin \left (10 \, f x + 10 \, e\right ) - 50 \, {\left (2 \, a \sin \left (6 \, f x + 6 \, e\right ) - 2 \, a \sin \left (4 \, f x + 4 \, e\right ) + a \sin \left (2 \, f x + 2 \, e\right )\right )} \sin \left (8 \, f x + 8 \, e\right ) - 100 \, {\left (2 \, a \sin \left (4 \, f x + 4 \, e\right ) - a \sin \left (2 \, f x + 2 \, e\right )\right )} \sin \left (6 \, f x + 6 \, e\right ) + a\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.44, size = 79, normalized size = 0.82 \begin {gather*} -\frac {{\left (15 \, \cos \left (f x + e\right )^{4} - 20 \, \cos \left (f x + e\right )^{2} + 8\right )} \sqrt {a \cos \left (f x + e\right )^{2}}}{15 \, {\left (a f \cos \left (f x + e\right )^{5} - 2 \, a f \cos \left (f x + e\right )^{3} + a f \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{6}{\left (e + f x \right )}}{\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.76, size = 128, normalized size = 1.33 \begin {gather*} \frac {\frac {3 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 25 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 150 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} + \frac {150 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 25 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5}}}{480 \, \sqrt {a} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 22.47, size = 491, normalized size = 5.11 \begin {gather*} -\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,4{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,32{}\mathrm {i}}{3\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^2\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,352{}\mathrm {i}}{15\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^3\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,128{}\mathrm {i}}{5\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^4\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,64{}\mathrm {i}}{5\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^5\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________